import request from "@/config/utils/request";
import { loadingParams } from "@/basa/utils/public";
// 获取发票列表
export function getInvoiceStoreList(data) {
  return request({
    url: "/apis/smp/invocebasic/listInvoceBasicPage",
    method: "POST",
    data
  });
}
// 新增发票单
export function saveInvoceBasic(data) {
  return request({
    url: "/apis/smp/invocebasic/saveInvoceBasic",
    method: "POST",
    data
  });
}
// 查询入库表列表
// export function listFinStoragePage(data) {
//   return request({
//     url: "/apis/smp/finstorage/listFinStoragePage",
//     method: "POST",
//     data
//   });
// }
export function listFinStoragePage(data) {
  return request({
    url: "/apis/smp/invocebasic/getFinStoragePage",
    method: "POST",
    data
  });
}
// 编辑发票单
export function editInvoceBasic(data) {
  return request({
    url: "/apis/smp/invocebasic/editInvoceBasic",
    method: "POST",
    data: { ...data, ...loadingParams }
  });
}
// 删除发票单
export function removeInvoceBasic(data) {
  return request({
    url: "/apis/smp/invocebasic/removeInvoceBasic",
    method: "POST",
    data: { ...data, ...loadingParams }
  });
}
// 查询发票单详情
export function getInvoceBasicById(data) {
  return request({
    url: "/apis/smp/invocebasic/getInvoceBasicById",
    method: "POST",
    data
  });
}
// 提交发票单
export function submitInvoice(data) {
  return request({
    url: "/apis/smp/invocebasic/submitInvoice",
    method: "POST",
    data: { ...data, ...loadingParams }
  });
}
// 撤回发票单
export function revokeInvoice(data) {
  return request({
    url: "/apis/smp/invocebasic/revokeInvoice",
    method: "POST",
    data: { ...data, ...loadingParams }
  });
}
// OCR识别
export function invoiceOcr(data) {
  return request({
    url: "/apis/smp/invocebasic/invoiceOcr",
    method: "POST",
    timeout:20*1000,
    data
  });
}

// export function listSettlementPage(data) {
//   return request({
//     url: "/apis/smp/settlement/listSettlementPage",
//     method: "POST",
//     data
//   });
// }
export function listSettlementPage(data) {
  return request({
    url: "/apis/smp/settlement/listSettlementInvoicingPage",
    method: "POST",
    data
  });
}
// 新增暂存
export function tempSaveInvoceBasic(data) {
    return request({
      url: "/apis/smp/invocebasic/tempSaveInvoceBasic",
      method: "POST",
      data
    });
  }
//   编辑暂存
  export function tempEditInvoceBasic(data) {
    return request({
      url: "/apis/smp/invocebasic/tempEditInvoceBasic",
      method: "POST",
      data
    });
  }

  //发票选择结算单时判断
  export function checkCurrNumAndInvoiceNum(data) {
    return request({
      url: "/apis/smp/invocebasic/checkCurrNumAndInvoiceNum",
      method: "POST",
      data
    });
  }

  //发票普票查询
  export function queryGeneralTicket(data) {
    return request({
      url: "/apis/smp/invocebasic/queryGeneralTicket",
      method: "POST",
      data
    });
  }

   //专票普票查询
   export function querySpecialTicket(data) {
    return request({
      url: "/apis/smp/invocebasic/querySpecialTicket",
      method: "POST",
      data
    });
  }
// 查询结算单明细
export function getSettlementListById(data) {
  return request({
    url: "/apis/smp/equipmentsettlement/getSettlementListById",
    method: "POST",
    data
  });
}

// 基本信息 - 项目名称
export function qryProjectDataAll(data) {
  return request({
    url: "/apis/smp/basic/qryProjectDataAll",
    method: "POST",
    data
  });
}

// 款项明细-原币币种
export function qryMoneyTypeDict(data) {
  return request({
    url: "/apis/smp/basic/qryMoneyTypeDict",
    method: "POST",
    data
  });
}

// 款项明细-变动
export function qryPaymentDetailChangeDict(data) {
  return request({
    url: "/apis/smp/basic/qryPaymentDetailChangeDict",
    method: "POST",
    data
  });
}
// 款项明细-往来性质
export function listTransactionPropertiesDict(data) {
  return request({
    url: "/apis/smp/basic/listTransactionPropertiesDict",
    method: "POST",
    data
  });
}

